@import "@styles/theme.scss";

$footerHeight: 100px;

.cart {
  height: 100%;
  background: #f4f4f4;
}

.cart__btn {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 30px;
  width: 260px;
  height: 65px;
  background: $color-brand;

  &-txt {
    color: #ffffff;
    font-size: 28px;
    line-height: 28px;
  }
}

.cart__footer {
  // NOTE RN 中没有 position: fixed，只能用 absolute 了或 flex 布局实现(此处不适用)
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: $footerHeight;

  &--placeholder {
    height: $footerHeight;
  }
}

.cart-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  background: #fbfbfb;
  border-top: 1px solid $border-color;
}

.cart-footer__select {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 250px;
  padding-left: $spacing-h-lg;

  &-txt {
    color: #7f7f7f;
    font-size: 28px;
    line-height: 28px;
  }
}

.cart-footer__amount {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  margin-right: $spacing-h-lg;

  &-txt {
    color: $primary-color;
    font-size: 28px;
  }
}

.cart-footer__btn {
  width: 226px;
}

.cart-list {
  background: #ffffff;
}

.cart-list__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: $spacing-h-lg;

  &-img {
    width: 160px;
    height: 160px;
    background: #fafafa;
    margin-right: 22px;
  }

  &-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  &-title {
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;

    &-tag {
      margin-right: 12px;
      color: #f48f18;
      font-size: 28px;
      line-height: 42px;
    }

    &-name {
      flex: 1;
      color: $text-color;
      font-size: 28px;
      line-height: 42px;
      @include text-ellipsis;
    }
  }

  &-spec {
    display: flex;
    flex-direction: row;
    margin-bottom: 16px;

    &-txt {
      padding: 6px 12px 4px;
      color: $text-color-light;
      font-size: 24px;
      line-height: 30px;
      background: #f4f3f4;
      border-radius: 4px;
      max-width: 370px;
    }
  }

  &-wrap {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  &-price {
    color: $primary-color;
    font-size: 26px;
    line-height: 26px;
  }
}

.user__recommend {
  display: flex;
  flex-direction: row;
  justify-content: center;

  &-txt {
    color: $text-color;
    font-size: $font-size-base;
    line-height: 1.5;
  }
}
